#include <stdio.h>

int main()
{
    int n;
    scanf("%d", &n);
    int x, y, temp;
    x = 1;
    y = 2;
    n = n - 1;
    while(n)
    {
        temp = x;
        x = y;
        y = temp + y;
        n--;
    }
    printf("%d", x);

    return 0;
}